<?php 
// echo $this->form;?>
    <fieldset>
        <legend>Usersuche</legend>
        <form action="<?php echo $this->escape($this->form->getAction()) ?>"
              method="<?php echo $this->escape($this->form->getMethod()) ?>"
              enctype="multipart/form-data">
              
            <div class="searchuser">
            	<?php echo $this->form->vorname; // render the id element here ?>
            </div>

            <div class="searchmail">
                <?php echo $this->form->mail; // render the user name field here ?>
            </div>
            <div class="searchuser">
            	<?php echo $this->form->friends; // render the id element here ?>
            </div>
            <?php echo $this->form->submit; ?>

        </form>
    </fieldset>

<?
if(!(empty($this->user))){
	?><table>
		<tr>
			<th>Name</th>
			<th>E-Mail</th>
			<th>Profillink</th>
			<th>Nachrichtenlink</th>
			<th>Freundesliste</th>
		</tr>
	<?php 
	foreach ($this->user as $array){
		?>
		<tr>
			<td><?php echo $this->escape($array['vorname']);?></td>
			<td><?php echo $this->escape($array['mail']);?></td>
			<td><a href="<?php echo $this->baseUrl() ?>/Auth/view/viewbarid/<?php echo $this->escape($array['id']);?>"> Profillink </a></td>
			<td><a href="<?php echo $this->baseUrl() ?>/Nachrichten/antworten/viewbarid/<?php echo $this->escape($array['id']);?>/friendid/<?php echo $this->escape($array['id']);?>">Nachricht senden</a></td>
			<td><a href="<?php echo $this->baseUrl() ?>/Nachrichten/friendsmessage/friendid/<?php echo $this->escape($array['id']);?>"> Freundeslink </a></td>
	
		</tr>
		<?php 
	}
	?>
	</table>
	<?php 
}

?>

